package MyPassage;

import MyPassage.model.Passage;
import MyPassage.model.Product;
import MyPassage.model.Wagon;
import MyPassage.util.GeneralUtils;
import javafx.application.Application;
import javafx.stage.Stage;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

public class MainApp extends Application {

    public void start(Stage stage) throws Exception {
        List<Product> products = new ArrayList<>();
        products.add(new Product("Макароны", 1));
        products.add(new Product("Сыр", 2));
        List<Wagon> wagons = new ArrayList<>();
        wagons.add(new Wagon("Перед рейсом", 0, products));
        wagons.add(new Wagon("какой-то вагон", 1, products));
        Passage passage = new Passage(LocalDate.now(), "первый рейс", wagons);
        GeneralUtils.createNewPassage(passage);
        System.exit(0);
    }

    public static void main(String[] args) throws Exception {
        launch(args);
    }
}
